//不要给我WA WA 叫
//一定AC
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <set>
#include <map>
#include <cstring>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <iomanip>
#include <climits>
#define int long long 
#define x first 
#define y second 
using namespace std;
const int N = 1e5 + 10;
int a[N];
void solve()
{
     int n,x;
     cin >> n >> x;
     for(int i = 1; i <= n; i++)
     {
        cin >> a[i];
     }
     int ans = 0;
     for(int i = 2; i <= n; i++)
     {
        if(a[i] != -999 && a[i - 1] != -999 && a[i - 1] != a[i])
        {
            ans++;
        }
        else if(a[i - 1] == -999 && a[i] != -999)
        {
            if(50 - a[i] >= x)
            {
                ans++;
            }
        }
        else if(a[i - 1] != -999 && a[i] == -999)
        {
            if(a[i - 1] - (-50) >= x)
            {
                ans++;
            }
        }
        else if(a[i - 1] == -999 && a[i] == -999)
        {
            ans++;
        }

     }
    // cout << ans << endl;
     int min_ans = 0;
     for(int i = 2; i <= n; i++)
     {
        if(a[i - 1] != -999 && a[i] != -999 && a[i - 1] - a[i] >= x)
        {
            min_ans++;
        }
        else if(a[i - 1] == -999 && a[i] != -999)
        {
            if(-50 - a[i] >= x)
            {
                min_ans++;
            }
        }
        else if(a[i - 1] != -999 && a[i] == -999)
        {
            if(a[i - 1] - 50 >= x)
            {
                min_ans++;
            }
        }
     }
   //  cout << min_ans << endl;
     sort(a + 1, a + n + 1);
     if(a[1] == a[n] && a[n] == -999)
     {
        min_ans = 0;
        ans = (n > 1) ? (n / 2) : 0;
     }
     cout << ans << " " << min_ans << endl;

}
signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr),cout.tie(nullptr);
    int t = 1;
    while(t -- )  solve();
    return 0;
}
